<%-- 
    Document   : mensaje
    Created on : 20-sep-2014, 13:08:52
    Author     : JoseHernan
--%>
<%
    if (session.getAttribute("userName") != null) {
        String userName = session.getAttribute("userName").toString();
        session.setAttribute("userName", userName);
%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%
    String mensaje = request.getParameter("mensaje");
    String pagina = request.getParameter("pagina");
%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>XSIS v1.0 - Expert System for Information Security</title>
        <link rel="stylesheet" href="View/css/metro-bootstrap.css">
        <link rel="stylesheet" href="View/css/metro-bootstrap-responsive.css">
        <link rel="stylesheet" href="View/css/iconFont.css">
        <script src="View/js/jquery/jquery.min.js"></script>
        <script src="View/js/jquery/jquery.widget.min.js"></script>
        <script src="View/js/jquery/jquery.mousewheel.js"></script>
        <script src="View/js/metro/metro.min.js"></script>
        <script src="View/js/metro/metro-progressbar.js"></script>
        <script type="text/javascript">
            var pagina = '<%= pagina%>';
            var segundos = 2000;//Volver a 3000
            function redireccion() {
                document.location.href=pagina;
            }
            setTimeout("redireccion()",segundos);
        </script>
        <script>
            $(function(){
                var pb = $('#pb1').progressbar();
                var progress = 0;
             
                var interval = setInterval(
                function(){
                    pb.progressbar('value', (progress+=5));
                    if (progress == 100) window.clearInterval(interval);
                }, 100);
            });
        </script>
    </head>
    <body class="metro" style="height: 400px">
        <%
            if (mensaje.equals("OK")) {
        %>
        <div id="mensaje" class="fg-darkCyan">  
            <h3 class="fg-darkCyan"><i class="icon-checkmark"></i> Se realizó la operación Satisfactoriamente.</h3>
        </div>
        <div id="pb1" class="progress-bar small" data-color="bg-darkCyan"></div>
        <%        } else {
        %>
        <div id="mensaje" class="fg-darkRed">  
            <h3 class="fg-darkRed"><i class=" icon-cancel-2"></i> Error: <%= mensaje %></h3>
        </div>
        <div id="pb1" class="progress-bar small" data-color="bg-darkRed"></div>
        <%
            }
        %>
    </body>
</html>
<% } else {

        out.print("<script language='Javascript'>"
                + "alert('Su sessión a expirado, ingrese nuevamente.');"
                + "window.top.location.href = 'index.jsp'"
                + "</script>");
    }%>